<?php

namespace app\agent\validate;

use think\Validate;

class Shop extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'shop_name' => 'require',
        'shop_images' => 'require',
        'business_license' => 'require',
        'legal_person' => 'require',
        'contacts' => 'require',
        'phone' => 'require',
        'province' => 'require',
        'city' => 'require',
        'districts' => 'require',
        'address' => 'require',
        'longitude' => 'require',
        'latitude' => 'require',
        'fixed_amount' => 'require',
        'source' => 'require',
        'status' => 'require'
    ];

    /**
     * 提示消息
     */
    protected $message = [
    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['shop_name', 'shop_images', 'business_license','legal_person','contacts','phone','province','city','districts','address','longitude','latitude','fixed_amount','source','status'],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'shop_name' => '商家名称',
            'shop_images' => '门店实景图片',
            'business_license' => '营业执照',
            'legal_person' => '法人',
            'contacts' => '联系人',
            'phone' => '联系电话',
            'province' => '省份',
            'city' => '城市',
            'districts' => '县区',
            'address' => '详细地址',
            'longitude' => '经度',
            'latitude' => '纬度',
            'fixed_amount' => '单次固定充值金额',
            'source' => '来源',
            'status' => '状态'
        ];
        $this->message = array_merge($this->message, [

        ]);
        parent::__construct($rules, $message, $field);
    }

}
